Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Control Settings

The setting parameter passed to the QTVRGetControlSetting and QTVRSetControlSetting functions is a long integer that specifies a particular control setting of an object node. Control settings specify whether the object can wrap during panning and tilting, as well as other features of the node. The control settings are specified using these constants:

typedef enum QTVRControlSetting {
    kQTVRWrapPan                                    = 1,
    kQTVRWrapTilt                                   = 2,
    kQTVRCanZoom                                    = 3,
    kQTVRReverseHControl                            = 4,
    kQTVRReverseVControl                            = 5,
    kQTVRSwapHVControl                              = 6,
    kQTVRTranslation                                = 7
} QTVRControlSetting;

Constant descriptions

kQTVRWrapPan
Set wrapping during panning. When this control setting is enabled, the user can wrap around from the current pan constraint maximum value to the pan constraint minimum value (or vice versa) using the mouse or arrow keys. In addition, calling the QTVRSetPanAngle function with a pan angle that is either less than or greater than the current pan constraints results in a pan angle within the current pan constraints. Similarly, QTVRWrapAndConstrain returns a pan angle within the current pan constraints, and QTVRNudge wraps views after it reaches the maximum or minimum constraint value.
When this control setting is disabled, the user cannot wrap around from the current pan constraint maximum value to the pan constraint minimum value (or vice versa) using the mouse or arrow keys. In addition, the QTVRSetPanAngle function returns the result code constraintReachedErr when passed a pan angle that is either less than or greater than the current pan constraints. Similarly, QTVRWrapAndConstrain returns a pan angle that is one of the current pan constraints, and QTVRNudge returns the result code constraintReachedErr when it reaches the maximum or minimum constraint value.
Note that a view animation stops when a constraint is reached unless palindrome view animation or wrapping during panning is enabled.
kQTVRWrapTilt
Set wrapping during tilting. When this control setting is enabled, the user can wrap around from the current tilt constraint maximum value to the tilt constraint minimum value (or vice versa) using the mouse or arrow keys. In addition, calling the QTVRSetTiltAngle function with a tilt angle that is either less than or greater than the current tilt constraints results in a tilt angle within the current tilt constraints. Similarly, QTVRWrapAndConstrain returns a tilt angle within the current tilt constraints, and QTVRNudge wraps views after it reaches the maximum or minimum constraint value.
When this control setting is disabled, the user cannot wrap around from the current tilt constraint maximum value to the tilt constraint minimum value (or vice versa) using the mouse or arrow keys. In addition, the QTVRSetTiltAngle function returns the result code constraintReachedErr when passed a tilt angle that is either less than or greater than the current tilt constraints. Similarly, QTVRWrapAndConstrain returns a tilt angle that is one of the current tilt constraints, and QTVRNudge returns the result code constraintReachedErr when it reaches the maximum or minimum constraint value.
kQTVRCanZoom
Set zooming to be active. When this control setting is enabled, the user can change the current field of view using the zoom-in and zoom-out keys on the keyboard (or using the VR controller buttons). In addition, you can use the QTVRSetFieldOfView function to alter the current field of view. Similarly, QTVRWrapAndConstrain returns a field of view within the current field of view constraints.
When this control is disabled, the user cannot change the current field of view using the zoom-in and zoom-out keys on the keyboard (or using the VR controller buttons). In addition, the QTVRSetFieldOfView function returns the result code constraintReachedErr and doesn't change the field of view. Similarly, QTVRWrapAndConstrain returns the current field of view.
kQTVRReverseHControl
Reverse the direction of the horizontal control. When this control setting is enabled, the user can change an object's horizontal view using the mouse or the keyboard arrows with reversed values for mouse horizontal motion and keyboard left and right arrows. (In other words, the left arrow key causes panning to the right, and moving the mouse right causes panning to the left.) Similarly, the QTVRNudge function nudges left when you pass the value 0 and right when you pass the value 180. This control setting is useful when an object's frames have been authored in reverse order.
kQTVRReverseVControl
Reverse the direction of the vertical control. When this control setting is enabled, the user can change an object's vertical view using the mouse or the keyboard arrows with reversed values for mouse vertical motion and keyboard up and down arrows. (In other words, the up arrow key causes tilting down, and moving the mouse down causes tilting up.) Similarly, the QTVRNudge function nudges up when you pass the value 270 and down when you pass the value 90. This control setting is useful when an object's frames have been authored in reverse order.
kQTVRSwapHVControl
Exchange the horizontal and vertical controls. When this setting is enabled, the user can pan left using the up arrow key and tilt up using the left arrow key. Similarly, the QTVRNudge function nudges up when you pass the value 180 and down when you pass the value 0. This control setting is useful if an object is a single-row or multirow movie containing vertically changing images. This is especially useful when enabling view animation for an object with animating vertical changes in view (because objects will animate only along rows, not along columns).
kQTVRTranslation
Set translation to be active. When this setting is enabled, the user can translate using the mouse when either the translation key is held down or the controller translation mode button is toggled on. In addition, you can use the QTVRSetViewCenter function to set a horizontal and vertical position in the current display coordinate system.
When this setting is disabled, the QTVRWrapAndConstrain function always returns the current view center, and the QTVRSetViewCenter function returns the result code constraintReachedErr and doesn't change the current view center.

© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |